package com.ymf.consumer.client;

import com.ymf.consumer.client.fallback.MyClientFalback;
import com.ymf.consumer.config.FeignConfig;
import com.ymf.consumer.pojo.Description;
import com.ymf.consumer.pojo.MyMessage;
import com.ymf.consumer.pojo.Skills;
import com.ymf.consumer.pojo.data;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

//声明当前类是一个feign客户端，指定服务名为page-service
@FeignClient(value = "page-service",fallback = MyClientFalback.class,configuration = FeignConfig.class)
public interface MyClient {

    //@GetMapping("/My/all")必须跟服务方的相同
    @GetMapping("/My/all")
    List<MyMessage> findall();
    @GetMapping("/My/desc/{id}")
    String desc(@PathVariable int id);
    @PostMapping("/My/updataAboutMe")
    int updataAboutMe(@RequestBody MyMessage myMessage);
    @PostMapping("My/updatamy_message")
    int updataMy_message(@RequestBody MyMessage myMessage);
    @GetMapping("/My/findskills")
    String findskills();
    @GetMapping("/My/deleteskillsbyid/{id}")
    int deleteSkillsById(@PathVariable int id);
    @PostMapping("/My/insertskills")
    int insertSkills(@RequestBody Skills skills);
    @PostMapping("/My/updateskills")
    int updateSkillsById(@RequestBody Skills skills);
    @PostMapping("/My/updatasignature")
    int updataSignature(@RequestBody MyMessage myMessage);
    @PostMapping("/My/deleteescription")
    int deleteEscription (@RequestBody Description description);
    @PostMapping("/My/insertdescription")
    int insertDescription (@RequestBody Description description);
    @PostMapping("/My/updatenotice")
    int updateNotice(@RequestBody MyMessage myMessage);
    @PostMapping("/My/uodateavatar")
    Integer uodateAvatar(@RequestBody MyMessage myMessage);

    @GetMapping("/My/redis")
    String findredis();
}
